import { defineStore } from 'pinia';
import { ref } from 'vue';

// 装备
// export const useEquipStore = defineStore('equipment', () => {
//   const equipment = ref<string[]>([]);

//   function setData(data: string[]) {
//     equipment.value = data;
//   }

//   return { equipment, setData };
// });

export interface IEquipmentState {
  equipment: string[]
}

export const useEquipStore = defineStore({
  id:'equipment',
  state:() =>(
    {
      equipment: []
    } as IEquipmentState
  ),
  actions: {
    setData(data: any){
     this.$state.equipment = data
    }
  }
})